<template>
  <view class="user-info-in-list-wrap">
    <view
        class="left send"
        :class="{recipient : type === 2}"
    >
      {{type === 1 ? '收' : '寄'}}
    </view>

    <view class="right-info">
      <view class="name">{{userInfo.name}}</view>
      <view class="address">{{userInfo.address}}</view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    type: {
      type: Number,
      default: 1
    },
    userInfo: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      goodsStatusMapText: {
        0: '待接单',
        1: '已接单',
        2: '配送中',
        3: '已完成'
      }
    }
  }
}
</script>

<style scoped lang="less">
.user-info-in-list-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 0 0 20rpx;
  box-sizing: border-box;
  margin-bottom: 20rpx;
  .left {
    width: 72rpx;
    height: 72rpx;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 20rpx;
  }
  .send {
    background-color: #f0ad4e;
  }
  .recipient {
    background-color: #157FB9;
  }

  .right-info {
    max-width: 500rpx;
    min-height: 72rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .name {
      font-size: 30rpx;
      margin-bottom: 4rpx;
    }
    .address {
      font-size: 24rpx;
      color: #c0c0c0;
    }
  }
}
</style>
